import {Component} from "@angular/core";
import {HistoryService} from "../../service/history/history.service";

@Component({
  selector: 'page-history',
  templateUrl: 'history.html',
  providers: [HistoryService]
})

export class HistoryPage {

  private articles: Array<any>;

  constructor(private  historyService: HistoryService) {
    const data: Array<any> = [];
    historyService.query().then(res => {
      res.forEach((v) => {
        data.push(v);
      });
      this.articles = data;
    });
  }
}
